package generic.genetic.gene;

import java.util.Random;

public abstract class BinaryGene<PhenoType> extends Gene<Boolean,PhenoType>{

	@Override
	public Boolean randomGeneTypeValue() {
		Random r = new Random();
		return new Boolean(r.nextBoolean());
	}

	@Override
	public String toString() {
		String s = "";
		for (Boolean bit : genotype) s += bit? 1 : 0;
		s += ""; 
		return s;
	}

	
}
